package com.ruoyi.system.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.system.domain.TbInvoiceRequests;
import com.ruoyi.system.vo.InvoiceListVo;
import org.apache.ibatis.annotations.Param;

/**
 * 发票申请Mapper接口
 * 
 * @author ruoyi
 * @date 2025-04-26
 */
public interface TbInvoiceRequestsMapper 
{
    /**
     * 查询发票申请
     * 
     * @param id 发票申请主键
     * @return 发票申请
     */
    public TbInvoiceRequests selectTbInvoiceRequestsById(Long id);

    /**
     * 查询发票申请列表
     * 
     * @param tbInvoiceRequests 发票申请
     * @return 发票申请集合
     */
    public List<TbInvoiceRequests> selectTbInvoiceRequestsList(TbInvoiceRequests tbInvoiceRequests);

    /**
     * 新增发票申请
     * 
     * @param tbInvoiceRequests 发票申请
     * @return 结果
     */
    public int insertTbInvoiceRequests(TbInvoiceRequests tbInvoiceRequests);

    /**
     * 修改发票申请
     * 
     * @param tbInvoiceRequests 发票申请
     * @return 结果
     */
    public int updateTbInvoiceRequests(TbInvoiceRequests tbInvoiceRequests);

    /**
     * 删除发票申请
     * 
     * @param id 发票申请主键
     * @return 结果
     */
    public int deleteTbInvoiceRequestsById(Long id);

    /**
     * 批量删除发票申请
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTbInvoiceRequestsByIds(Long[] ids);

    /**
     * 查询开票统计
     *
     * @param userId 用户id
     * @return {@link Object }
     */
    Map<String,Object> queryTheInvoicingStatistics(@Param("userId") Long userId);

    /**
     * 查询可开票订单
     *
     * @param userId 用户id
     * @return {@link List }<{@link TbInvoiceRequests }>
     */
    List<InvoiceListVo> queryOrderThatCanBeInvoiced(@Param("userId") Long userId);
}
